﻿package mortal.game.resource
{
    import com.gengine.resource.*;
    import flash.utils.*;

    public class Resource3dKilAlpha extends Object
    {
        private var _kilAlphaNameList:Dictionary;
        private var _hasInit:Boolean = false;
        public static const instance:Resource3dKilAlpha = new Resource3dKilAlpha;

        public function Resource3dKilAlpha()
        {
            this._kilAlphaNameList = new Dictionary(false);
            return;
        }// end function

        public function init() : void
        {
            var _loc_4:String = null;
            if (this._hasInit)
            {
                return;
            }
            this._hasInit = true;
            var _loc_1:* = ConfigManager.instance.getJSONByFileName("isJpgList.json") as Array;
            var _loc_2:* = _loc_1.length;
            var _loc_3:int = 0;
            while (_loc_3 < _loc_2)
            {
                
                _loc_4 = _loc_1[_loc_3];
                this._kilAlphaNameList[_loc_4] = true;
                _loc_3++;
            }
            return;
        }// end function

        public function isJpg(param1:String) : Boolean
        {
            if (!param1)
            {
                return true;
            }
            if (!this._hasInit)
            {
                throw new Error("请先初始化Resource3dKilAlpha");
            }
            param1 = param1.toLowerCase().replace(/\.jpg|\.png|\.abc""\.jpg|\.png|\.abc/i, "");
            var _loc_2:* = this._kilAlphaNameList.hasOwnProperty(param1);
            return _loc_2;
        }// end function

    }
}
